projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aefaff8
)
spi: sf: Print the error code on failure
author
Simon Glass
<
[email protected]
>
Sun, 7 Jun 2015 14:50:32 +0000
(08:50 -0600)
committer
Simon Glass
<
[email protected]
>
Wed, 15 Jul 2015 00:03:15 +0000
(18:03 -0600)
Rather than just 'ERROR', display the error code, which may be useful, at
least with driver model.
Signed-off-by: Simon Glass <
[email protected]
>
Reviewed-by: Bin Meng <
[email protected]
>
Acked-by: Marek Vasut <
[email protected]
>
Reviewed-by: Jagan Teki <
[email protected]
>
common/cmd_sf.c
patch
|
blob
|
history
diff --git
a/common/cmd_sf.c
b/common/cmd_sf.c
index aef8c2a5ea8498073d520dfbc127c0c9acc32e19..3746e0d9644f08aca368e60cf153387a79dab187 100644
(file)
--- a/
common/cmd_sf.c
+++ b/
common/cmd_sf.c
@@
-303,8
+303,12
@@
static int do_spi_flash_read_write(int argc, char * const argv[])
else
ret = spi_flash_write(flash, offset, len, buf);
- printf("SF: %zu bytes @ %#x %s: %s\n", (size_t)len, (u32)offset,
- read ? "Read" : "Written", ret ? "ERROR" : "OK");
+ printf("SF: %zu bytes @ %#x %s: ", (size_t)len, (u32)offset,
+ read ? "Read" : "Written");
+ if (ret)
+ printf("ERROR %d\n", ret);
+ else
+ printf("OK\n");
}
unmap_physmem(buf, len);